<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('新增机构产品类型配置')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content" th:object="${ecardDeptPrdTypeList}">
    <form class="form-horizontal m" id="form-prdType-add">
        <input name="deptId" th:value="*{deptId}" type="hidden">
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">独立法人机构：</label>
            <div class="col-sm-9">
                <select id="deptId" class="form-control m-b" style="width: 89%;"
                        th:with="type=${@dept.selectDeptListByType('2')}"
                        disabled>
                    <option value="">所有</option>
                    <option th:each="dept : ${type}" th:text="${dept.deptName}" th:value="${dept.deptId}"
                            th:field="*{deptId}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">产品类型：</label>
            <div class="col-sm-8" th:with="type=${@dict.getType('prd_typ')}">
                <label th:each="dict : ${type}" class="check-box">
                    <input name="prdType" type="checkbox" th:value="${dict.dictValue}"
                           th:text="${dict.dictLabel}" required>
                </label>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    var prefix = ctx + "ecard/config/prdType"
    $("#form-prdType-add").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/add", $('#form-prdType-add').serialize());
        }
    }
</script>
</body>
</html>